import request from '@/utils/request';
// import qs from 'qs';

export const GetAllMenu = () => request({
  method: 'GET',
  url: '/boss/menu/getAll',
});

export const GetMenuNodes = () => request({
  method: 'GET',
  url: '/boss/menu/getMenuNodeList',
});

export const getRoleMenus = (id) => request({
  method: 'GET',
  url: '/boss/menu/getRoleMenus',
  params: { roleId: id },
});

export const GetMenuInfo = (menuID = -1) => request({
  method: 'GET',
  url: `/boss/menu/getEditMenuInfo?id=${menuID}`,
});

export const saveOrUpdateMenu = (data) => request({
  method: 'POST',
  url: '/boss/menu/saveOrUpdate',
  data,
});

export const DeleteMenu = (menuID = -1) => request({
  method: 'DELETE',
  url: `/boss/menu/${menuID}`,
});

export default {};
